#ifndef CAMPAIGN_H
#define CAMPAIGN_H


#include "dtwenty_global.h"
#include "dtwenty_defines.h"


#include <dataroot.h>


#include <QTimer>
#include <QMetaEnum>


class CharacterClasses;
class CampaignSkills;
class CampaignFeats;
class CampaignSpecials;


class DTWENTYSHARED_EXPORT Campaign : public DataRoot
{
    Q_OBJECT

    Q_ENUMS(Attribute)

public:

    enum Attribute
    {
        Strength = 0,
        Dexterity,
        Constitution,
        Intelligence,
        Wisdom,
        Charisma
    };

    const int SKILLS_TYPE;
    const int FEATS_TYPE;
    const int SPECIALS_TYPE;
    const int CLASSES_TYPE;


    Q_INVOKABLE Campaign(QObject *parent = 0);

    Campaign(const Campaign& other);

    CharacterClasses* classes() const;
    CampaignSkills* skills() const;
    CampaignFeats* feats() const;
    CampaignSpecials* specials() const;

    DataSuite* suite(int type) const;

    QList<int> types() const;

    static QString attributeName(Attribute attr);


protected slots:

    virtual void onInitialize();


private:

    QPointer<DataSuite> m_classes;
    QPointer<DataSuite> m_skills;
    QPointer<DataSuite> m_feats;
    QPointer<DataSuite> m_specials;


};

Q_DECLARE_METATYPE(Campaign::Attribute)
Q_DECLARE_METATYPE(Campaign*)



#endif // CAMPAIGN_H


